<?php

use Faker\Generator as Faker;

$factory->define(App\Models\Product::class, function (Faker $faker) {
    $image = $faker->randomElement([
        'https://img.alicdn.com/bao/uploaded/i1/TB1v03Ykm8YBeNkSnb4SuuevFXa.jpg_240x5000Q60s0.jpg',
        'https://img.alicdn.com/bao/uploaded/i1/TB1GCdwsFOWBuNjy0FiSutFxVXa.jpg_240x5000Q60s0.jpg',
        'https://img.alicdn.com/bao/uploaded/i1/TB1TIXJsKGSBuNjSspbSuwiipXa.jpg_240x5000Q60s0.jpg',
        'https://img.alicdn.com/bao/uploaded/i1/TB1iv_WvY1YBuNjSszeSuublFXa.jpg_240x5000Q60s0.jpg_.webp',
        'https://img.alicdn.com/bao/uploaded/i1/TB1NxgxyuSSBuNjy0FlSuvBpVXa.jpg_240x5000Q60s0.jpg_.webp',
        'https://img.alicdn.com/bao/uploaded/i1/TB1zwfVxFuWBuNjSszbSuwS7FXa.jpg_240x5000Q60s0.jpg_.webp'
    ]);
    return [
        //
        'title' =>  $faker->word,
        'description'   =>  $faker->sentence,
        'image' =>  $image,
        'on_sale'   =>  true,
        'rating'    =>  $faker->numberBetween(0,5),
        'sold_count'    =>  0,
        'review_count'  =>  0,
        'price' =>  0
    ];
});
